/*  1:   */ package org.intellij.images.options.impl;
/*  2:   */ 
/*  3:   */

import com.intellij.openapi.util.JDOMExternalizable;
import com.intellij.openapi.util.JDOMExternalizer;
import org.intellij.images.options.ExternalEditorOptions;
import org.jdom.Element;

import java.beans.PropertyChangeSupport;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */ 
/*  9:   */ final class ExternalEditorOptionsImpl
/* 10:   */   implements ExternalEditorOptions, JDOMExternalizable
/* 11:   */ {
/* 12:   */   private final PropertyChangeSupport a;
/* 13:   */   private String b;
/* 14:   */   
/* 15:   */   public ExternalEditorOptionsImpl(PropertyChangeSupport paramPropertyChangeSupport)
/* 16:   */   {
/* 17:38 */     this.a = paramPropertyChangeSupport;
/* 18:   */   }
/* 19:   */   
/* 20:   */   public String getExecutablePath()
/* 21:   */   {
/* 22:42 */     return this.b;
/* 23:   */   }
/* 24:   */   
/* 25:   */   void setExecutablePath(String paramString)
/* 26:   */   {
/* 27:46 */     String str = this.b;
/* 28:47 */     if (((str != null) && (!str.equals(paramString))) || ((str == null) && (paramString != null)))
/* 29:   */     {
/* 30:48 */       this.b = paramString;
/* 31:49 */       this.a.firePropertyChange("ExternalEditor.executablePath", str, this.b);
/* 32:   */     }
/* 33:   */   }
/* 34:   */   
/* 35:   */   public ExternalEditorOptions clone()
/* 36:   */     throws CloneNotSupportedException
/* 37:   */   {
/* 38:54 */     return (ExternalEditorOptions)super.clone();
/* 39:   */   }
/* 40:   */   
/* 41:   */   public void inject(ExternalEditorOptions paramExternalEditorOptions)
/* 42:   */   {
/* 43:58 */     setExecutablePath(paramExternalEditorOptions.getExecutablePath());
/* 44:   */   }
/* 45:   */   
/* 46:   */   public boolean setOption(String paramString, Object paramObject)
/* 47:   */   {
/* 48:62 */     if ("ExternalEditor.executablePath".equals(paramString)) {
/* 49:63 */       setExecutablePath((String)paramObject);
/* 50:   */     } else {
/* 51:65 */       return false;
/* 52:   */     }
/* 53:67 */     return true;
/* 54:   */   }
/* 55:   */   
/* 56:   */   public void readExternal(Element paramElement)
/* 57:   */   {
/* 58:71 */     this.b = JDOMExternalizer.readString(paramElement, "ExternalEditor.executablePath");
/* 59:   */   }
/* 60:   */   
/* 61:   */   public void writeExternal(Element paramElement)
/* 62:   */   {
/* 63:75 */     JDOMExternalizer.write(paramElement, "ExternalEditor.executablePath", this.b);
/* 64:   */   }
/* 65:   */   
/* 66:   */   public boolean equals(Object paramObject)
/* 67:   */   {
/* 68:79 */     if (this == paramObject) {
/* 69:80 */       return true;
/* 70:   */     }
/* 71:82 */     if (!(paramObject instanceof ExternalEditorOptions)) {
/* 72:83 */       return false;
/* 73:   */     }
/* 74:86 */     ExternalEditorOptions localExternalEditorOptions = (ExternalEditorOptions)paramObject;
/* 75:   */     
/* 76:88 */     return localExternalEditorOptions.getExecutablePath() == null ? true : this.b != null ? this.b.equals(localExternalEditorOptions.getExecutablePath()) : false;
/* 77:   */   }
/* 78:   */   
/* 79:   */   public int hashCode()
/* 80:   */   {
/* 81:95 */     return this.b != null ? this.b.hashCode() : 0;
/* 82:   */   }
/* 83:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.intellij.images.options.impl.ExternalEditorOptionsImpl

 * JD-Core Version:    0.7.0.1

 */